Micron Document
<!DOCTYPE html>
<html class="client-nojs vector-feature-night-mode-disabled vector-feature-language-in-header-enabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 vector-sticky-header-enabled" lang="en" dir="ltr"><head>
<meta charset="UTF-8">
<title>Process control block</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="https://en.wikipedia.org/wiki/Process_control_block"> <link href="./mw/ext.cite.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.icons.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.search.codex.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/skins.vector.styles.css" rel="stylesheet" type="text/css">
<link href="./mw/user.styles.css" rel="stylesheet" type="text/css">
<meta name="ResourceLoaderDynamicStyles" content="">
<link rel="stylesheet" type="text/css" href="./mw/site.styles.css">
<link rel="stylesheet" type="text/css" href="./mw/noscript.css">
<link rel="stylesheet" type="text/css" href="./footer.css">
<link rel="stylesheet" type="text/css" href="./vector-2022.css">
</head>
<body class="skin--responsive skin-vector skin-vector-search-vue mediawiki ltr sitedir-ltr mw-hide-empty-elt ns-0 ns-subject page-Process_control_block rootpage-Process_control_block skin-vector-2022 action-view">
<div class="mw-page-container">
<div class="mw-page-container-inner">
<div class="mw-content-container">
<main id="content" class="mw-body">
<header class="mw-body-header vector-page-titlebar">
<h1 id="firstHeading" class="firstHeading mw-first-heading">
<span id="openzim-page-title" class="mw-page-title-main"><span class="mw-page-title-main">Process control block</span></span>
</h1>
</header>
<a id="top"></a>
<div id="bodyContent" class="vector-body ve-init-mw-desktopArticleTarget-targetContainer" aria-labelledby="firstHeading" data-mw-ve-target-container="">
<div id="mw-content-text" class="mw-body-content mw-content-ltr" lang="en" dir="ltr"><div class="mw-content-ltr mw-parser-output" lang="en" dir="ltr"><style data-mw-deduplicate="TemplateStyles:r1236090951">
/* start https://en.wikipedia.org/ */


.mw-parser-output .hatnote{font-style:italic}.mw-parser-output div.hatnote{padding-left:1.6em;margin-bottom:0.5em}.mw-parser-output .hatnote i{font-style:normal}.mw-parser-output .hatnote+link+.hatnote{margin-top:-0.5em}@media print{body.ns-0 .mw-parser-output .hatnote{display:none!important}}


/* end https://en.wikipedia.org/ */
</style><div role="note" class="hatnote navigation-not-searchable">For printed circuit boards (PCB), see <a href="Printed_circuit_board" title="Printed circuit board">Printed circuit board</a>.</div>

<p>A <b>process control block</b> (<b>PCB</b>), also sometimes called a <b>process descriptor</b>, is a data structure used by a computer <a href="Operating_system" title="Operating system">operating system</a> to store all the information about a <a href="Process_(computing)" title="Process (computing)"> process</a>.
</p><p>When a process is created (initialized or installed), the operating system creates a corresponding process control block, which specifies and tracks the process state (i.e. new, ready, running, waiting or terminated). Since it is used to track process information, the PCB plays a key role in <a href="Context_switching" class="mw-redirect" title="Context switching">context switching</a>.<sup id="cite_ref-1" class="reference"><a href="#cite_note-1"><span class="cite-bracket">[</span>1<span class="cite-bracket">]</span></a></sup>
</p><p>An operating system kernel stores PCBs in a process table.<sup id="cite_ref-2" class="reference"><a href="#cite_note-2"><span class="cite-bracket">[</span>2<span class="cite-bracket">]</span></a></sup>
</p><p>The current <a href="Working_directory" title="Working directory">working directory</a> of a process is one of the properties that the kernel stores in the process's PCB.<sup id="cite_ref-3" class="reference"><a href="#cite_note-3"><span class="cite-bracket">[</span>3<span class="cite-bracket">]</span></a></sup>
</p>
<meta property="mw:PageProp/toc">
<div class="mw-heading mw-heading2"><h2 id="Role">Role</h2></div>
<p>The role of the PCBs is central in <a href="Scheduling_(computing)" title="Scheduling (computing)">process management</a>: they are accessed and/or modified by most utilities, particularly those involved with scheduling and resource management.
</p>
<div class="mw-heading mw-heading2"><h2 id="Structure">Structure</h2></div>
<p>In <a href="Computer_multitasking" title="Computer multitasking">multitasking</a> operating systems, the PCB stores data needed for correct and efficient process management.<sup id="cite_ref-OSConcepts_4-0" class="reference"><a href="#cite_note-OSConcepts-4"><span class="cite-bracket">[</span>4<span class="cite-bracket">]</span></a></sup> Though the details of these structures are system-dependent, common elements fall in three main categories:
</p>
<ul><li>Process identification</li>
<li>Process state</li>
<li>Process control</li></ul>
<p>Status tables exist for each relevant entity, like describing memory, I/O devices, files and processes.
</p><p>Memory tables, for example, contain information about the allocation of main and secondary (virtual) memory for each process, authorization attributes for accessing memory areas shared among different processes, etc. I/O tables may have entries stating the availability of a device or its assignment to a process, the status of I/O operations, the location of memory buffers used for them, etc.
</p><p><i>Process identification data</i> include a unique identifier for the process (almost invariably an integer) and, in a multiuser-multitasking system, data such as the identifier of the parent process, user identifier, user group identifier, etc. The process id is particularly relevant since it is often used to cross-reference the tables defined above, e.g. showing which process is using which I/O devices, or memory areas.
</p><p><i>Process state data</i> define the status of a process when it is suspended, allowing the OS to restart it later. This always includes the content of general-purpose CPU registers, the CPU process status word, stack and frame pointers, etc. During <a href="Context_switch" title="Context switch">context switch</a>, the running process is stopped and another process runs. The kernel must stop the execution of the running process, copy out the values in hardware registers to its PCB, and update the hardware registers with the values from the PCB of the new process.
</p><p><i>Process control information</i> is used by the OS to manage the process itself. This includes:
</p>
<ul><li>Process scheduling state – The state of the process in terms of "ready", "suspended", etc., and other scheduling information as well, such as priority value, the amount of time elapsed since the process gained control of the CPU or since it was suspended. Also, in case of a suspended process, event identification data must be recorded for the event the process is waiting for;</li>
<li>Process structuring information – the process's children id's, or the id's of other processes related to the current one in some functional way, which may be represented as a queue, a ring or other data structures;</li>
<li>Interprocess communication information – flags, signals and messages associated with the communication among independent processes;</li>
<li>Process Privileges – allowed/disallowed access to system resources;</li>
<li>Process State – new, ready, running, waiting, dead;</li>
<li>Process Number (PID) – unique identification number for each process (also known as <a href="Process_identifier" title="Process identifier">Process ID</a>);</li>
<li>Program Counter (PC) – a pointer to the address of the next instruction to be executed for this process;</li>
<li>CPU Registers – register set where process needs to be stored for execution for running state;</li>
<li>CPU Scheduling Information – information scheduling CPU time;</li>
<li>Memory Management Information – page table, memory limits, segment table;</li>
<li>Accounting Information – amount of <a href="Central_processing_unit" title="Central processing unit">CPU</a> used for process execution, time limits, execution ID etc.;</li>
<li>I/O Status Information – list of I/O devices allocated to the process.</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Location">Location</h2></div>
<p>PCB must be kept in an area of memory protected from normal process access. In some operating systems the PCB is placed at the bottom of the process <a href="Call_stack" title="Call stack">stack</a>.<sup id="cite_ref-5" class="reference"><a href="#cite_note-5"><span class="cite-bracket">[</span>5<span class="cite-bracket">]</span></a></sup>
</p>
<div class="mw-heading mw-heading2"><h2 id="See_also">See also</h2></div>
<ul><li><a href="Thread_control_block" title="Thread control block">Thread control block</a> (TCB)</li>
<li><a href="Process_Environment_Block" title="Process Environment Block">Process Environment Block</a> (PEB)</li>
<li><a href="Program_segment_prefix" class="mw-redirect" title="Program segment prefix">Program segment prefix</a> (PSP)</li>
<li><a href="Data_segment" title="Data segment">Data segment</a></li>
<li><a href="Task_Control_Block" title="Task Control Block">Task Control Block</a> for the equivalent in IBM mainframe software</li></ul>
<div class="mw-heading mw-heading2"><h2 id="Notes">Notes</h2></div>
<style data-mw-deduplicate="TemplateStyles:r1239543626">
/* start https://en.wikipedia.org/ */


.mw-parser-output .reflist{margin-bottom:0.5em;list-style-type:decimal}@media screen{.mw-parser-output .reflist{font-size:90%}}.mw-parser-output .reflist .references{font-size:100%;margin-bottom:0;list-style-type:inherit}.mw-parser-output .reflist-columns-2{column-width:30em}.mw-parser-output .reflist-columns-3{column-width:25em}.mw-parser-output .reflist-columns{margin-top:0.3em}.mw-parser-output .reflist-columns ol{margin-top:0}.mw-parser-output .reflist-columns li{page-break-inside:avoid;break-inside:avoid-column}.mw-parser-output .reflist-upper-alpha{list-style-type:upper-alpha}.mw-parser-output .reflist-upper-roman{list-style-type:upper-roman}.mw-parser-output .reflist-lower-alpha{list-style-type:lower-alpha}.mw-parser-output .reflist-lower-greek{list-style-type:lower-greek}.mw-parser-output .reflist-lower-roman{list-style-type:lower-roman}


/* end https://en.wikipedia.org/ */
</style><div class="reflist">
<div class="mw-references-wrap"><ol class="references">
<li id="cite_note-1"><span class="mw-cite-backlink"><b><a href="#cite_ref-1">^</a></b></span> <span class="reference-text"><style data-mw-deduplicate="TemplateStyles:r1238218222">
/* start https://en.wikipedia.org/ */


.mw-parser-output cite.citation{font-style:inherit;word-wrap:break-word}.mw-parser-output .citation q{quotes:"\"""\"""'""'"}.mw-parser-output .citation:target{background-color:rgba(0,127,255,0.133)}.mw-parser-output .id-lock-free.id-lock-free a{background:url("./mw/Lock-green.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-limited.id-lock-limited a,.mw-parser-output .id-lock-registration.id-lock-registration a{background:url("./mw/Lock-gray-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .id-lock-subscription.id-lock-subscription a{background:url("./mw/Lock-red-alt-2.svg")right 0.1em center/9px no-repeat}.mw-parser-output .cs1-ws-icon a{background:url("./mw/Wikisource-logo.svg")right 0.1em center/12px no-repeat}body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-free a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-limited a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-registration a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .id-lock-subscription a,body:not(.skin-timeless):not(.skin-minerva) .mw-parser-output .cs1-ws-icon a{background-size:contain;padding:0 1em 0 0}.mw-parser-output .cs1-code{color:inherit;background:inherit;border:none;padding:inherit}.mw-parser-output .cs1-hidden-error{display:none;color:var(--color-error,#d33)}.mw-parser-output .cs1-visible-error{color:var(--color-error,#d33)}.mw-parser-output .cs1-maint{display:none;color:#085;margin-left:0.3em}.mw-parser-output .cs1-kern-left{padding-left:0.2em}.mw-parser-output .cs1-kern-right{padding-right:0.2em}.mw-parser-output .citation .mw-selflink{font-weight:inherit}@media screen{.mw-parser-output .cs1-format{font-size:95%}html.skin-theme-clientpref-night .mw-parser-output .cs1-maint{color:#18911f}}@media screen and (prefers-color-scheme:dark){html.skin-theme-clientpref-os .mw-parser-output .cs1-maint{color:#18911f}}


/* end https://en.wikipedia.org/ */
</style><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.baeldung.com/cs/process-control-block">"Process Control Block | Baeldung on Computer Science"</a>. 25 June 2020.</cite></span>
</li>
<li id="cite_note-2"><span class="mw-cite-backlink"><b><a href="#cite_ref-2">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://www.usna.edu/Users/cs/wcbrown/courses/IC221/classes/L09/Class.html">"Class 9: The Unix Filesystem"</a>. <i>www.usna.edu</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-12-09</span></span>.</cite></span>
</li>
<li id="cite_note-3"><span class="mw-cite-backlink"><b><a href="#cite_ref-3">^</a></b></span> <span class="reference-text"><cite class="citation web cs1"><a rel="nofollow" class="external text" href="https://pages.cs.wisc.edu/~bart/537/lecturenotes/s25.html">"CS 537 Notes: Directories"</a>. <i>pages.cs.wisc.edu</i><span class="reference-accessdate">. Retrieved <span class="nowrap">2023-12-09</span></span>.</cite></span>
</li>
<li id="cite_note-OSConcepts-4"><span class="mw-cite-backlink"><b><a href="#cite_ref-OSConcepts_4-0">^</a></b></span> <span class="reference-text"><cite id="CITEREFGagne2013" class="citation book cs1">Gagne, Abraham Silberschatz, Peter Baer Galvin, Greg (2013). <span class="id-lock-limited" title="Free access subject to limited trial, subscription normally required"><a rel="nofollow" class="external text" href="https://archive.org/details/operatingsystemc00silb_198"><i>Operating system concepts</i></a></span> (9th&nbsp;ed.). Hoboken, N.J.: Wiley. pp.&nbsp;<a rel="nofollow" class="external text" href="https://archive.org/details/operatingsystemc00silb_198/page/n130">107</a>–108. <a href="ISBN_(identifier)" class="mw-redirect" title="ISBN (identifier)">ISBN</a>&nbsp;<bdi>9781118063330</bdi>.</cite><span class="cs1-maint citation-comment"><code class="cs1-code">{{cite book}}</code>: CS1 maint: multiple names: authors list (link)</span></span>
</li>
<li id="cite_note-5"><span class="mw-cite-backlink"><b><a href="#cite_ref-5">^</a></b></span> <span class="reference-text">Yong, Zhang, "Breaking through the Maximum Process Number", "Linux Journal", 1 January 2004, <a rel="nofollow" class="external autonumber" href="http://www.linuxjournal.com/article/4407">[1]</a>.</span>
</li>
</ol></div></div></div><!--htdig_noindex--><div><div class="zim-footer">
This article is issued from <a class="external text" title="Last edited on 2025-04-04" href="https://en.wikipedia.org/wiki/?title=Process_control_block&amp;oldid=1283895046">Wikipedia</a>. The text is available under <a class="external text" href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">Creative Commons Attribution-Share Alike 4.0</a> unless otherwise noted. Additional terms may apply for the media files.
</div>
</div><!--/htdig_noindex--></div>
</div>
</main>
</div>
</div>
</div>

</body></html>